import java.text.SimpleDateFormat;
import java.util.Date;

public class Main12 {
    public static void main(String[] args){
        SimpleDateFormat sdf = new SimpleDateFormat();
        sdf.applyPattern("yyyy-MM-dd HH:mm:ss a");
        Date date= new Date();
        System.out.println("当前时间为:"+sdf.format(date));
    }
}
